export interface StatusConfig {
  key: string
  name: string
  color: string
  displayName: string
}

export const STATUS_CONFIG: StatusConfig[] = [
  {
    key: 'red',
    name: '红色状态',
    color: '#ff4444',
    displayName: '红色'
  },
  {
    key: 'blue',
    name: '蓝色状态',
    color: '#4444ff',
    displayName: '蓝色'
  },
  {
    key: 'purple',
    name: '紫色状态',
    color: '#8844ff',
    displayName: '紫色'
  }
]

export const getStatusColor = (status: string): string => {
  const config = STATUS_CONFIG.find(s => s.key === status)
  return config ? config.color : '#666666'
}

export const getStatusName = (status: string): string => {
  const config = STATUS_CONFIG.find(s => s.key === status)
  return config ? config.name : '未知状态'
}

export const getNextStatus = (currentStatus: string): string => {
  const currentIndex = STATUS_CONFIG.findIndex(s => s.key === currentStatus)
  const nextIndex = (currentIndex + 1) % STATUS_CONFIG.length
  return STATUS_CONFIG[nextIndex].key
}

export type StatusKey = typeof STATUS_CONFIG[number]['key'] 